package com.leanin.form.contoller;

import com.leanin.form.model.response.QueryResponseResult;
import com.leanin.form.service.DataDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CPJ.
 * @date 2019/6/14.
 * @time 15:20.
 */
@RestController
@RequestMapping("/dataDictionary")
public class DataDictionaryController {

    @Autowired
    private DataDictionaryService dataDictionaryService;

    /**
     * 根据code查询字典 模糊查询
     * @param code
     * @return
     */
    @GetMapping("/findByCode")
    public QueryResponseResult findByCode(String code){
        return dataDictionaryService.findByCode(code);
    }
}
